/**
 **用于招工端--我的项目接口集
 *****
 * ************/
import request from '../utils/fetch'

//我的项目
export function projectList(data) {
    return request({
        url: '/api/foreman/my/project/list',
        method: 'get',
        loading: false,
        params: data
    })
}

//发布项目
export function addProject(data) {
    return request({
        url: '/api/foreman/add/project',
        method: 'post',
        requestBody: 'body',
        loading: true,
        data: data
    })
}

//删除招工项目-projectId
export function delectProject(data) {
    return request({
        url: '/api/foreman/delete/project',
        method: 'post',
        loading: true,
        data: data
    })
}

//指定项目列表-projectId
export function projectCraftList(data) {
    return request({
        url: '/api/foreman/project/craft/list',
        method: 'get',
        loading: false,
        params: data
    })
}

//项目详情-projectId
export function projectInfo(data) {
    return request({
        url: '/api/foreman/project/info',
        method: 'get',
        loading: true,
        params: data
    })
}


//查询项目下工种匹配工人列表
//工种-fpiId type=0(待招工人)；type=1(已招工人)
export function customerList(data) {
    return request({
        url: '/api/recruit/project/customer/list',
        method: 'get',
        loading: true,
        params: data
    })
}
//移除工人
export function removeCustomer(data) {
    return request({
        url: '/api/recruit/remove/customer',
        method: 'post',
        loading: true,
        params: data
    })
}
//发送邀请函
export function confirmationAdd(data) {
    return request({
        url: '/api/confirmation/add',
        method: 'post',
        requestBody: 'body',
        loading: true,
        data: data
    })
}
//查看邀请函
export function confirmationInfo(data) {
    return request({
        url: '/api/confirmation/info',
        method: 'get',
        loading: true,
        params: data
    })
}
//新增项目工种详情
export function projectAddCraft(data) {
    return request({
        url: '/api/foreman/project/add/craft',
        method: 'post',
        requestBody: 'body',
        loading: true,
        data: data
    })
}


//新增项目工种详情
export function projectUpdateCraft(data) {
    return request({
        url: '/api/foreman/project/update/craft',
        method: 'post',
        requestBody: 'body',
        loading: true,
        data: data
    })
}